package com.orange.common.exception;

import com.orange.common.exception.result.CodeEnum;
import lombok.Getter;

/**
 * @author : kyc
 * @Description: 客户端异常
 * @date : 2021-02-04 10:55
 **/
@Getter
public class CustomerException extends OrangeException {

    /**
     * 状态码
     */
    private final CodeEnum codeEnum;

    /**
     * 错误详细信息
     */
    private final String errorMessage;

    public CustomerException(String errorMessage) {
        this.codeEnum = CodeEnum.ILLEGAL_REQUEST;
        this.errorMessage = errorMessage;
    }

    public CustomerException(CodeEnum codeEnum, String errorMessage) {
        this.codeEnum = codeEnum;
        this.errorMessage = errorMessage;
    }
}
